<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 遍历数组
    var arr = [45, 32, 45, 1, 2, 6]
    for (let x of arr) {
      console.log(x);
    }
    // 遍历map map() 方法返回一个新数组，数组中的元素为原始数组元素调用函数处理后的值。

    // map() 方法按照原始数组元素顺序依次处理元素。： map() 不会改变原始数组
    var map = new Map([['wulaoda', 100], ['wulaoer', 90], ['wulaosan', 80]])
    for (let x of map) {
      console.log(x);
    }
    // 遍历set，set会去重
    var set = new Set([32, 45, 65, 4, 21, 4254, 78, 21, 55, 5, 5, 5, 1, 45])
    for (let x of set) {
      console.log(x);
    }
  </script>
</head>

<body>

</body>

</html>